Skip to content

Convert to Python3#9

Open
ralic wants to merge 3 commits intolinnarsson-lab:masterfrom
Python3pkg:master
Open

Convert to Python3#9
ralic wants to merge 3 commits intolinnarsson-lab:masterfrom
Python3pkg:master

Conversation

@ralic
Copy link
Copy Markdown

@ralic ralic commented May 18, 2017

using : find . -name '*.py' | xargs 2to3 -w

@slinnarsson slinnarsson requested a review from gioelelm May 18, 2017 12:09
@slinnarsson
Copy link
Copy Markdown
Contributor

Thanks for doing this! What did you do to verify that it works? Did you run it on a test sample?

@ralic
Copy link
Copy Markdown
Author

ralic commented May 18, 2017

Yes , I do tested it under python3.

The script after python3 setup.py install will install an incorrect in /usr/local/bin/backspin.

However using the backspin in the folder /build/scripts-3.6 , it's running well.

Also it's ok to import as in your readme file.

Loading file.
Performing feature selection
Selected 500 genes
backSPIN started
----------------

Input file:
oligos.cef

Output file:
oligos_clustered.cef

numLevels: 2
first_run_iters: 10
first_run_step: 0.100
runs_iters: 8
runs_step: 0.300
split_limit_g: 2
split_limit_c: 2
stop_const: 1.150
low_thrs: 0.200


Preparatory SPIN

Sorting cells.
Neighbourood=531, 481, 436, 395, 358, 324, 293, 265, 240, 217, 196, 177, 160, 144, 130, 117, 105, 94, 84, 75, 67, 60, 53, 47, 41, 36, 31, 27, 23, 20, 17, 14, 11, 9, 7, 5, 3, 1, 
Splitting (500, 820) 
in (57,205) 
and (443,615)
Sorting cells.
Neighbourood=135, 103, 78, 59, 44, 33, 24, 17, 12, 8, 5, 3, 1, 
Sorting cells.
Neighbourood=395, 303, 232, 177, 135, 103, 78, 59, 44, 33, 24, 17, 12, 8, 5, 3, 1, 
Splitting (57, 205) 
in (43,100) 
and (14,105)
Sorting genes.
Neighbourood=33, 
24, 
17, 
12, 
8, 
5, 
3, 
1, 

Sorting cells.
Neighbourood=59, 
44, 
33, 
24, 
17, 
12, 
8, 
5, 
3, 
1, 

Sorting genes.
Neighbourood=8, 
5, 
3, 
1, 

Sorting cells.
Neighbourood=78, 
59, 
44, 
33, 
24, 
17, 
12, 
8, 
5, 
3, 
1, 

Splitting (443, 615) 
in (332,408) 
and (111,207)
Sorting genes.
Neighbourood=232, 
177, 
135, 
103, 
78, 
59, 
44, 
33, 
24, 
17, 
12, 
8, 
5, 
3, 
1, 

Sorting cells.
Neighbourood=303, 
232, 
177, 
135, 
103, 
78, 
59, 
44, 
33, 
24, 
17, 
12, 
8, 
5, 
3, 
1, 

Sorting genes.
Neighbourood=78, 
59, 
44, 
33, 
24, 
17, 
12, 
8, 
5, 
3, 
1, 

Sorting cells.
Neighbourood=135, 
103, 
78, 
59, 
44, 
33, 
24, 
17, 
12, 
8, 
5, 
3, 
1, 

Writing output.

@slinnarsson
Copy link
Copy Markdown
Contributor

Ok, thanks. Gioele @gioelelm, if you think it looks ok, go ahead and merge.

@gioelelm
Copy link
Copy Markdown
Contributor

Hi @ralic,
Thank you for the interest in our algorithm.
I believe that the current version is both python 2.7 and 3.x compatible. So I am not sure why the changes are needed, could you specify the issue you are having with the current version?

Also I could not replicate your problem with python setup install, maybe your issue is the fact that you are trying to install with python 3 while you have activated a py2.7 conda environment. I tested it on a py3 environment, no problem (also using pip). Separate environments avoid this kind of problems, not sure if there is a way to solve it and whether your commits deal with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants